﻿@model IEnumerable<BskLeague.Models.Season>

@{
    ViewBag.Title = "Zarządzaj sezonami";
}

@Html.Partial("_Submenu") <br />

<h3>Sezony</h3>

<p>
    @Html.ActionLink("Stwórz nowy sezon", "CreateSeason")
</p>
<table>
    <tr>
        <th>
            Nazwa sezonu
        </th>
        <th>
            Status
        </th>
        <th>
            Zmień status
        </th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.SeasonName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Status.Status)
        </td>
        <td>
            @Html.ActionLink("Nabór", "MakeRecrutation", new { id=item.SeasonId }) |
            @Html.ActionLink("Aktywny", "MakeActive", new { id=item.SeasonId }) |
            @Html.ActionLink("Zakończony", "MakeFinished", new { id=item.SeasonId })
        </td>
    </tr>
}

</table>
